@extends('admin::layouts.master')
@section('content')
    <div class="card" id="app">
        <div class="card-header">货物管理</div>
        <ul role="tablist" class="nav nav-tabs">
            <li class="nav-item"><a href="/buy/huowu" class="nav-link">货物列表</a></li>
            <li class="nav-item"><a href="#" class="nav-link active">添加货物</a></li>
        </ul>
        <form action="/buy/huowu" method="post">
            <div class="card-body card-body-contrast">
                @csrf
                <div class="form-group row">
    <label for="attr" class="col-12 col-sm-3 col-form-label text-md-right">货物属性</label>
    <div class="col-12 col-md-9">
        <input id="attr" name="attr" type="text"
               value="{{ $huowu['attr']??old('attr') }}"
               class="form-control form-control-sm form-control{{ $errors->has('attr') ? ' is-invalid' : '' }}">
        @if ($errors->has('attr'))
            <span class="invalid-feedback" role="alert">
                <strong>{{ $errors->first('attr') }}</strong>
            </span>
        @endif
    </div>
</div>
<div class="form-group row">
    <label for="kucun" class="col-12 col-sm-3 col-form-label text-md-right">货物库存</label>
    <div class="col-12 col-md-9">
        <input id="kucun" name="kucun" type="text"
               value="{{ $huowu['kucun']??old('kucun') }}"
               class="form-control form-control-sm form-control{{ $errors->has('kucun') ? ' is-invalid' : '' }}">
        @if ($errors->has('kucun'))
            <span class="invalid-feedback" role="alert">
                <strong>{{ $errors->first('kucun') }}</strong>
            </span>
        @endif
    </div>
</div>
<div class="form-group row">
    <label for="fujiaprice" class="col-12 col-sm-3 col-form-label text-md-right">附加价格</label>
    <div class="col-12 col-md-9">
        <input id="fujiaprice" name="fujiaprice" type="text"
               value="{{ $huowu['fujiaprice']??old('fujiaprice') }}"
               class="form-control form-control-sm form-control{{ $errors->has('fujiaprice') ? ' is-invalid' : '' }}">
        @if ($errors->has('fujiaprice'))
            <span class="invalid-feedback" role="alert">
                <strong>{{ $errors->first('fujiaprice') }}</strong>
            </span>
        @endif
    </div>
</div>

            </div>
            <div class="card-footer text-muted">
                <button class="btn btn-primary offset-sm-2">保存提交</button>
            </div>
        </form>
    </div>
@endsection
